from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from login import models
admin.site.register(models.Group)


ADDITIONAL_FIELDS = ((None, {'fields': ('nickname', 'nickclassnumber', 'group', )}),)


class MyUserAdmin(UserAdmin):
    fieldsets = UserAdmin.fieldsets + ADDITIONAL_FIELDS
    add_fieldsets = UserAdmin.fieldsets + ADDITIONAL_FIELDS


admin.site.register(models.MyUser, MyUserAdmin)
